package com.cskaoyan.bean.marketingmanagementbean;

import com.cskaoyan.bean.MarketTopic;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author stone
 * @date 2022/01/06 16:28
 */
@NoArgsConstructor
@Data
public class TopicData {
    private Integer total; //总的数据量，没有分页的情况下的数据量
    private Integer pages; //总的页码数
    private Integer limit; //当前页最多的数据量
    private Integer page; //当前页的页码
    private List<MarketTopic> list; //当前页的数据
    //alt + s

    public static TopicData data(long total, Integer pages, Integer limit, Integer page, List list) {
        TopicData topicData = new TopicData();
        topicData.setTotal((int) total);
        topicData.setPages(pages);
        topicData.setPage(page);
        topicData.setLimit(limit);
        topicData.setList(list);
        return topicData;
    }
}
